Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Mar 8, 2025

Context

Replace variations of select / dropdown with a @shadcn/ui Select component that solves z-index issues.

Implementation

Screenshots

before after

How to Test

Get in Touch


Important

Refactor settings UI to use @shadcn/ui Select component, rename files for clarity, and update tests accordingly.

  • Behavior:
    • Replaces various select/dropdown components with @shadcn/ui Select component in AdvancedSettings.tsx, BrowserSettings.tsx, and ProviderSettings.tsx.
    • Updates ProviderSettings to handle API configuration changes more effectively.
  • Refactoring:
    • Renames ApiConfigManager.tsx to ProfileSwitcher.tsx and ApiOptions.tsx to ProviderSettings.tsx.
    • Updates imports and references to reflect new file names in ChatView.tsx, TaskHeader.tsx, and ModelPicker.tsx.
  • Testing:
    • Updates tests to reflect component renames and new Select component usage in ProfileSwitcher.test.tsx and ProviderSettings.test.tsx.
  • Misc:
    • Adjusts CSS in index.css to support new component styles.
    • Minor updates to SettingsView.tsx to integrate new components.

This description was created by Ellipsis for 38e41c4. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2025

⚠️ No Changeset found

Latest commit: 2e9c56a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Mar 8, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 8, 2025
errorMessage.setAttribute("data-testid", "dialog-error-message")
errorMessage.textContent = "A profile with this name already exists"
errorMessage.className = "text-vscode-errorForeground text-sm mt-2"
dialogContent.appendChild(errorMessage)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct DOM manipulation (using appendChild to add error messages) in tests is not ideal. Consider simulating error states via component props or state updates so that tests remain declarative.

jest.mock("../ProfileSwitcher", () => ({
__esModule: true,
default: ({ currentApiConfigName }: any) => (
<div data-testid="api-config-management">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the mock from ../ApiConfigManager to ../ProfileSwitcher is appropriate given the renaming. For clarity, consider updating related test IDs if the component’s name has changed in the DOM as well.

Suggested change
<div data-testid="api-config-management">
<div data-testid="profile-switcher">

@cte cte marked this pull request as draft March 8, 2025 09:32
@hannesrudolph hannesrudolph moved this from New to PR [Greenlit] in Roo Code Roadmap Mar 8, 2025
@cte cte closed this Mar 10, 2025
@github-project-automation github-project-automation bot moved this from PR [Greenlit] to Done in Roo Code Roadmap Mar 10, 2025
@cte cte deleted the cte/settings-cleanup branch March 10, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants